<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Email Verification | Goldfish System</title>
    <style>
        :root {
            --primary-color: #2c3e50;
            --secondary-color: #18bc9c;
            --warning-color: #e67e22;
        }

        body {
            background-color: #f8f9fa;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            font-family: 'Helvetica Neue', Arial, sans-serif;
        }

        .verify-container {
            max-width: 600px;
            background: white;
            border-radius: 12px;
            padding: 2.5rem;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            text-align: center;
        }

        h1 {
            color: var(--primary-color);
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
        }

        .email-link {
            display: inline-block;
            background: var(--secondary-color);
            color: white !important;
            padding: 1rem 2rem;
            border-radius: 30px;
            text-decoration: none;
            font-weight: bold;
            margin: 1.5rem 0;
            transition: transform 0.2s;
        }

        .email-link:hover {
            transform: translateY(-2px);
        }

        .instructions {
            color: #666;
            line-height: 1.8;
            margin: 1.5rem 0;
        }

        .time-alert {
            background: #fff3e0;
            border-left: 4px solid var(--warning-color);
            padding: 1rem;
            margin: 2rem 0;
            text-align: left;
            border-radius: 6px;
        }

        .time-alert strong {
            color: var(--warning-color);
        }

        .nav-links {
            margin-top: 2rem;
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .nav-link {
            color: var(--primary-color);
            text-decoration: none;
            padding: 0.8rem 1.2rem;
            border: 2px solid var(--primary-color);
            border-radius: 6px;
            transition: all 0.3s;
        }

        .nav-link:hover {
            background: rgba(24, 188, 156, 0.1);
            border-color: var(--secondary-color);
        }

        @media (max-width: 576px) {
            .verify-container {
                padding: 1.5rem;
                margin: 1rem;
            }

            .email-link {
                width: 100%;
                box-sizing: border-box;
            }

            .nav-links {
                flex-direction: column;
            }
        }
    </style>
</head>
<body>
<div class="verify-container">
    <h1>📧 Email Verification Required</h1>

    <div class="email-box">
        <a th:href="${link}" class="email-link" th:text="'Go to ' + ${site} + ' Verify'"></a>
    </div>

    <div class="instructions">
        <p>✅ Already logged in: Click button to verify immediately<br>
            🔐 Not logged in: Login to your email first</p>
    </div>

    <div class="time-alert">
        ⏳ Verification code generated at: <strong th:text="${time}"></strong><br>
        ⚠️ Expires in: <strong>5 minutes</strong>
    </div>

    <div class="nav-links">
        <a href="/" class="nav-link">◀️ Back to Login</a>
        <a th:href="@{/verify(resend=true)}" class="nav-link">🔄 Resend Email</a>
    </div>
</div>
</body>
</html>